<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>计时器简单操作</title>
	</head>
	<body>
		<script type="text/javascript">
			//3秒后在网页输出：我爱JS
			function myFum(){
				document.write("我爱JS"+"<br>")
			}
			//3秒后在网页输出：我爱JS
			//window.setTimeout(myFum(3000))
			
			//每隔3秒在网页输出：我爱JS
			window.setInterval(myFum,1000)
			
		</script>
	</body>
</html>
